﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="mfForumList.aspx.cs" Inherits="msBsc.WebUi.mMall.Public.mfForumList" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>地接客-推荐列表</title>
    <%=getMeta()%>
    <link href="/themes/mStyle1/css/home/base.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" href="/themes/mStyle1/mGlobal.css" charset="gbk" />
    <link rel="stylesheet" type="text/css" href="/themes/mStyle1/mhome.css" charset="gbk" />
    <link href="/themes/mStyle1/css/public/mTravelIndex.css" rel="stylesheet" />
    <%=getBodyBeforeJs()%>
    <style type="text/css">
        .carlist {
            bottom: 0;
            left: 0;
            overflow: auto;
            top: 97px;
            width: 100%;
            z-index: -1;
            overflow-x: visible;
            overflow-y: visible;
        }

        .listcon {
            position: relative;
            width: 100%;
        }

            .listcon dl {
                border: 1px solid #ffffff;
                background-color: #ffffff;
                margin: 13px auto;
                overflow: auto;
                position: relative;
                width: 98%;
            }

                .listcon dl dt {
                    display: block;
                    float: left;
                    width: 130px;
                }

        a {
            color: inherit;
            outline: medium none;
            text-decoration: none;
        }

        .listcon dl dt img {
            display: block;
            height: 80px;
            margin: 13px auto;
            width: 80px;
            border-radius: 55px;
        }

        img {
            border: 0 none;
        }

        .listcon dl dd {
            display: block;
            font-size: 15px;
            line-height: 21px;
        }

            .listcon dl dd h3 {
                font-size: 14px;
                font-weight: normal;
                height: 37px;
                line-height: 43px;
                overflow: hidden;
                font-weight: bold;
                color: #c3c3c3;
            }

            .listcon dl dd p {
                color: #666666;
                line-height: 35px;
                font-size: 17px;
                overflow: hidden;
                font-weight: bold;
            }

        .b_price {
            color: red;
            font-size: 15px;
            font-weight: bold;
        }

        .listcon dl dd p .span_l {
            margin-right: 5px;
            text-align: left;
        }

        .listcon dl dd p span {
            display: block;
            float: left;
        }

        .span_r {
            float: right;
            margin-right: 5px;
            border-radius: 7px;
            display: inline-block;
            font-size: 15px;
            min-width: 50px;
            text-align: center;
        }

        body {
            margin: 0;
            padding: 0;
            background-color: #ffffff;
        }

        .viewport {
            background-color: #edeeee;
        }

        .green {
            background: none repeat scroll 0 0 #69cd38;
            border: medium none;
            border-radius: 7px;
            color: #fff;
            cursor: pointer;
            display: inline-block;
            font-size: 16px;
            font-weight: bold;
            height: 36px;
            line-height: 36px;
            padding: 0 20px;
            text-align: center;
            min-width: 200px;
            width: 100%;
        }

        .fabu {
            width: 95%;
            margin: 15px auto;
        }

        .pageInfo {
            font-size: 18px;
            height: 20px;
            padding-left: 10px;
        }

        .log {
            background-color: #ffffff;
            height: 20px;
            margin: 1px auto;
            text-align: center;
            width: 98%;
            cursor: pointer;
        }

        .list_nav ul li {
            width: 33.33% !important;
        }
    </style>
</head>
<body style="margin: 0; padding: 0;">
    <input type="hidden" id="countryId" value="DF6723BE-A25C-4F77-BB49-A1662D3E6F2A" />
    <input type="hidden" id="cityId" value="AEF39D8E-D298-4AF1-AEC5-2B00D237F5F5" />
    <input type="hidden" id="destionId" value="" />
    <input type="hidden" id="key" value="" />
    <input type="hidden" id="rowCount" value="0" />
    <input type="hidden" id="pageIndex" value="1" />
    <div class="viewport">
        <header class="search-bar" style="">
            <%--<form id="J_shSearchForm" method="get" action="/m/mp_TravelIndex.htm>">--%>
            <div class="search-bar-tbl">
                <div class="search-bar-cell-3">
                    <a href="javascript:void(0);" onclick="history.go(-1);" style="color: #fff; vertical-align: middle; line-height: 28px; font-size: 16px; padding-left: 6px; padding-right: 6px;">&lt;&lt;</a>
                </div>
                <div class="search-bar-cell-2">
                    <div class="search-textfile">
                        <%--<a id="searchbtn" href="javascript:void(0);" onclick="Search()" class="btn-home-search"></a>--%>
                        <input autocomplete="off" name="f" id="f" placeholder="请输入以下区域的推荐名称" class="search-textfile-input" />
                    </div>
                </div>
                <div class="search-bar-cell-3" id="myFilterBtn">
                    <a href="javascript:void(0);" onclick="Search()" class="search">搜索</a>
                </div>
            </div>
            <%--</form>--%>
            <div class="floor " id="divmymFilter" style="margin-top: 3px; margin-bottom: 3px;">
                <div id="content_goods_form">

                    <div class="list_nav">
                        <ul class="clearfix">
                            <li>
                                <span class="nav_span">
                                    <span class="city_name">全部</span>
                                    <dfn class="sjia sjia_bom"></dfn>
                                </span>
                                <select id="country_select">
                                    <option value="">全部</option>
                                </select>
                            </li>
                            <li>
                                <span class="nav_span">
                                    <span class="city_name">全部</span>
                                    <dfn class="sjia sjia_bom"></dfn>
                                </span>
                                <select id="city_select">
                                    <option value="">全部</option>
                                </select>
                            </li>
                            <li>
                                <span class="nav_span">
                                    <span class="city_name">全部</span>
                                    <dfn class="sjia sjia_bom"></dfn>
                                </span>
                                <select id="destion_select">
                                    <option value="">全部</option>
                                </select>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
            <script type="text/javascript">
                //function initmymmall() {
                //    $("#myFilterBtn").live("click", function () {
                //        $("#divmymFilter").toggle('fast');
                //    });
                //};
                //initmymmall();

                //function initschListBtn() {
                //    $(".schListBtn").click(function () {
                //        var _self = $(this);
                //        if (_self.hasClass("schListBtn-type1")) {
                //            _self.removeClass("schListBtn-type1").addClass("schListBtn-type2");
                //            $("#J_ItemList").removeClass("album").addClass("list");
                //        } else {
                //            _self.removeClass("schListBtn-type2").addClass("schListBtn-type1");
                //            $("#J_ItemList").removeClass("list").addClass("album");
                //        }
                //    });
                //};
                //initschListBtn();




            </script>
        </header>
        <div class="main">
            <div class="carlist">
                <%--<div class="fabu">
                    <a href="/ms_ReleaseForum.htm" class="green">发布信息</a>
                </div>--%>
                <div class="listcon" id="forumList">
                    <%--<dl>
                        <dt><a href="">
                            <img src="/UpLoad/Djack/djack.jpg 67x60img.jpg" /></a>
                        </dt>
                        <dd>
                            <h3><a href="">地界客 人名</a> <span class="span_r">2015/12/1</span></h3>
                            <p><span class="span_l">这里是标题信息这里是标题信息这里是标题信息这里是标题信息这里是标题信息这里是标题信息这里是标题信息这里是标题信息这里是标题信息这里是标题信息这里是标题信息这里是标题信息这里是标题信息这里是标题信息这里是标题信息这里是标题信息这里是标题信息</p>
                        </dd>
                    </dl>--%>
                </div>
                <xmp id="svc_list_temp" style="display: none">
                        {{#for(var i=0,len=d.rows.length;i < len;i++){ }}
                            <dl onclick="window.location.href='/mp_ForumInfo.htm?forumId={{d.rows[i].SOURCE_POSTS_ID}}'">
                                <dt>
                                    <a href="/mp_DjackVehicle.htm?djackId={{d.rows[i].POSTS_PUBLISH_BY}}">
                                    <img title="{{d.rows[i].CUSTOMER_NICK}}" src="{{d.rows[i].CUSTOMER_DEFAULT_PIC}} 67x60img.jpg" /></a>
                                </dt>
                                <dd>
                                    <h3><a href="/mp_DjackVehicle.htm?djackId={{d.rows[i].POSTS_PUBLISH_BY}}" >{{d.rows[i].CUSTOMER_NICK}}</a>
                                        <span class="span_r">{{d.rows[i].POSTS_PUBLISH_TIME}}</span>
                                    </h3>
                                    <a title="{{d.rows[i].SOURCE_POSTS_TITLE}}"  href="/mp_ForumInfo.htm?forumId={{d.rows[i].SOURCE_POSTS_ID}}" class="span_l">
                                        {{ d.rows[i].SOURCE_POSTS_TITLE}}
                                    </a>
                                </dd>
                            </dl>
                        {{#} }}
                    </xmp>

                <div id="xLoading" style="display: none" class="log">更多信息加载中请稍后...</div>
                <div id="nextPage" onclick="goPage();" class="log">查看更多</div>
            </div>
            <%=msBsc.WebUi.Code.QtHtmlGet.GetWapMenuHtml() %>
        </div>
    </div>
    <!--start JS引用-->
    <%--<script src="/??jqPlugin/js/jquery-1.8.3.min.js,js/jBase.js,js/jmPage.js,themes/Style1/jsQt.js,jqPlugin/js/laytpl.js"
        type="text/javascript"></script>
    <script type="text/javascript" src="/jqPlugin/js/jBase.js"></script>--%>
    <script type="text/javascript" src="/jqPlugin/js/jquery-1.8.3.min.js"></script>
    <script type="text/javascript" src="/jqPlugin/js/jBase.js"></script>
    <script type="text/javascript" src="/jqPlugin/js/jmPage.js"></script>
    <script type="text/javascript" src="/themes/Style1/jsQt.js"></script>
    <script type="text/javascript" src="/jqPlugin/js/laytpl.js"></script>
    <script src="/themes/wStyle1/js/comm/VerifyJs.js"></script>
    <!--end JS引用-->
    <script type="text/javascript">
        (function () {
            //得到参数
            $("#countryId").val(GetQueryStr("countryId"));
            $("#cityId").val(GetQueryStr("cityId"));
            $("#destionId").val(GetQueryStr("destionId"));
            if (isNaN(GetQueryStr("pIndex")) == false || IsNull(GetQueryStr("pIndex"))) {
                $("#pageIndex").val("1");
            } else {
                $("#pageIndex").val(GetQueryStr("pIndex"));
            }
            $("#key").val(GetQueryStr("key"));
            $("#f").val(GetQueryStr("key"));
            var countryId = $("#countryId").val();
            var cityId = $("#cityId").val();
            var destionId = $("#destionId").val();


            //改变国家
            $("#country_select").change(function () {
                var countryId = $(this).val();
                var cityId = "";
                var destionId = "";
                var keys = $("#f").val();
                window.location.href = "/mp_ForumList.htm?countryId=" + countryId + "&cityId=" + cityId + "&destionId=" + destionId + "&pIndex=1&key=" + encodeURIComponent(keys);
            });
            //改变城市
            $("#city_select").change(function () {
                var countryId = $("#country_select").val();
                var cityId = $(this).val();
                var destionId = "";
                var keys = $("#f").val();
                window.location.href = "/mp_ForumList.htm?countryId=" + countryId + "&cityId=" + cityId + "&destionId=" + destionId + "&pIndex=1&key=" + encodeURIComponent(keys);
            });
            //改变目的地
            $("#destion_select").change(function () {
                var countryId = $("#country_select").val();
                var cityId = $("#city_select").val();
                var destionId = $(this).val();
                var keys = $("#f").val();
                window.location.href = "/mp_ForumList.htm?countryId=" + countryId + "&cityId=" + cityId + "&destionId=" + destionId + "&pIndex=1&key=" + encodeURIComponent(keys);
            });
            //$("#h_title").text("地接客-推荐列表");
            //$.getMessageCount();
        })();
        var pageSize = 15;
        function btnDo(sEbtn) {
            GtGrid1Action = sEbtn;
            var opart = GetGtParam();
            ajaxComm(opart);
        };

        //执行AJAX调用时获取参数
        function GetGtParam() {
            var _jsParam = new jsonRow();
            _jsParam = addNoAreStatistics(_jsParam, "旅游推荐", "m0014");
            _jsParam.AddCell("postsKey", $("#key").val());
            _jsParam.AddCell("parentsId", "00000000-0000-0000-0000-000000000000");
            _jsParam.AddCell("destionId", $("#destionId").val());
            _jsParam.AddCell("cityId", $("#cityId").val());
            _jsParam.AddCell("countryId", $("#countryId").val());
            _jsParam.AddCell("pIndex", $("#pageIndex").val());
            _jsParam.AddCell("pRows", pageSize);
            _jsParam.AddCell("ACTION", GtGrid1Action);
            return _jsParam;
        };

        btnDo("init");

        //查询
        function Search() {
            var countryId = $("#country_select").val();
            var cityId = $("#city_select").val();
            var destionId = $("#destion_select").val();
            var keys = $("#f").val();
            window.location.href = "/mp_ForumList.htm?countryId=" + countryId + "&cityId=" + cityId + "&destionId=" + destionId + "&pIndex=1&key=" + encodeURIComponent(keys);
        }

        //显示地区
        function setCity(data, selectId, selectCity) {
            if (IsNull(data) || data.rows.length < 1) {
                return;
            }
            $("#" + selectId).html("");
            var cityName = "";
            for (var i = 0; i < data.rows.length; i++) {
                if (data.rows[i].COUNTRY_CITY_ID == selectCity) {
                    $("#" + selectId).append("<option selected='selected' value='" + data.rows[i].COUNTRY_CITY_ID + "'>" + data.rows[i].COUNTRY_CITY_NME + "</option>");
                    cityName = data.rows[i].COUNTRY_CITY_NME;
                } else {
                    $("#" + selectId).append("<option value='" + data.rows[i].COUNTRY_CITY_ID + "'>" + data.rows[i].COUNTRY_CITY_NME + "</option>");
                }
            }
            if (IsNull(cityName)) {
                cityName = data.rows[0].COUNTRY_CITY_NME;
            }
            $("#" + selectId).siblings(".nav_span").children(".city_name").text(cityName);
        }

        function setPage(rowCount, index) {
            if (parseInt(index) < 1 || parseInt(rowCount) < 1 || (pageSize * index) >= rowCount) {
                $("#xLoading").show();
                $("#xLoading").html("下面没有更多分页了...");
                $("#nextPage").hide();
            }
            else {
                $("#xLoading").hide();
                $("#xLoading").html("正在加载中...");
                $("#nextPage").show();
            }
        }

        function goPage() {
            var pageIndex = $("#pageIndex").val();
            $("#pageIndex").val((parseInt(pageIndex) + 1));
            btnDo("init");
        }
    </script>
</body>
</html>
